{% extends "common/layout.html" %}

{% block content %}
    {% if current_user %}
        <div class="row">
            <div class="page-header">
                <h1>{{ info.name | safe }}</h1><a class="pull-right"
                                                  href="{{ buildUrl('/') }}"><small>返回列表</small></a></h1>
            </div>
            <div class="row">
                <div class="col-lg-4">
                    <img class="img-thumbnail"
                         src="{{ info.cover_pic }}"
                         alt="...">
                                    <h3><span class="label label-primary">访问数量：{{ info.view_counter }}</span></h3>
                </div>
                <div class="col-lg-8">
                    <div class="panel panel-default">
                        <!-- Default panel contents -->
                        <div class="panel-heading">{{ info.name | safe }}</div>
                        <div class="panel-body">
                            <p>更&emsp;&emsp;新：{{ info.pub_date | safe }}</p>
                            <p>类&emsp;&emsp;型：{{ info.classify|safe }}</p>
                            <p>主&emsp;&emsp;演：{{ info.actor|safe }}</p>
                            <p>剧情介绍：{{ info.desc|safe }}</p>
                            <p>下载链接：
                            <div class="panel panel-default">
                                <div class="panel-body">
                                    {{ info.magnet_url |safe }}
                                </div>
                            </div>
                            </p>
                            <p>原&emsp;地址：<a target="_blank" href="{{ info.url | safe }}">{{ info.url | safe }}</a></p>
                        </div>

                        <!-- List group -->
                        <ul class="list-group">
                            <li class="list-group-item">随机推荐</li>
                            <li class="list-group-item">
                                <div class="row">
                                    {% for item in recommand_list %}
                                        <div class="col-lg-3 ">
                                            {#                    <a class="thumbnail" href="{{ buildUrl('/info?id=') }}{{ item.id }}">#}

                                            <a class="thumbnail"
                                               href="{{ '%s?id=%s' | format( buildUrl('/info'),item.id ) }}">
                                                <img style="width: 160px;height:200px"
                                                     src="{{ item.cover_pic }}"
                                                     alt="...">
                                                <div class="caption">
                                                    <h3 style="overflow: hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 1;">
                                                        {{ item.name }}</h3>

                                                </div>
                                            </a>
                                        </div>
                                    {% endfor %}
                                </div>


                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    {% else %}
        <h1>401</h1>
        <p>无权限，请注册后并登录</p>
    {% endif %}
{% endblock %}


